
CMAKE_MINIMUM_REQUIRED(VERSION 3.10...3.25)
# 支持project-version参数
CMAKE_POLICY(SET CMP0048 NEW)
CMAKE_POLICY(SET CMP0079 NEW)
# if-exp里边可以直接使用内部变量不加${}
CMAKE_POLICY(SET CMP0054 NEW)

PROJECT(xgame_server_lua VERSION "0.0.0.1")

include(xcmake_util/init_default_env.cmake)
include(xcmake_util/shell_util.cmake)
include(xcmake_util/version_util.cmake)
include(xcmake_util/file_util.cmake)
include(xcmake_util/target_util.cmake)
include(xcmake_util/mem_check_build_option.cmake)
include(xcmake_util/cppcheck.cmake)

#开启compile_commands.json ycm如果在搜索.ycm_extra_conf.py之前找到了json会停止搜索使用json作为配置
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

include(third_part/xcmake/import_lua.cmake)
#include(third_part/xcmake/import_sol2.cmake)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/xthird_part/xcmake")

find_package(sol2)
find_package(xboost)

include_directories(${XBOOST_INC_DIR})
include_directories(${SOL2_INC_DIR})


ENABLE_TESTING()

add_subdirectory(src)